package com.heaboy.emaidemo1.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;

// 映射YAML中的email.servers配置
@Component
@ConfigurationProperties(prefix = "email")
@Data
public class EmailServersConfig {

    private List<EmailServer> servers;


    @Data
    public static class EmailServer {
        private String username;   // 邮箱账号
        private String password;   // 授权码
        private String host;       // SMTP主机
        private String port;       // 端口
        private String smtpAuth;   // 是否需要认证
    }
}